package com.stone.bean.vo;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author stone
 * @date 2022/4/22 16:45
 */
@Data
public class MenuNodeVO {

    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty(value = "菜单名称")
    private String name;
    @ApiModelProperty(value = "菜单排序")
    private Integer orderNum;
    @ApiModelProperty(value = "链接地址")
    private String url;
    @ApiModelProperty(value = "类型（1-目录 2-菜单 3-按钮）")
    private Integer type;

    @ApiModelProperty(value = "菜单图标")
    private String icon;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty("是否显示")
    private Boolean hiddenFlag;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "子菜单")
    private List<MenuNodeVO> children = Lists.newArrayList();
    @ApiModelProperty(value = "子菜单ids")
    private List<Long> childrenIds;
}
